package com.huawei.appmarket.service.usercenter.personal.view.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.huawei.appgallery.foundation.ui.framework.cardframe.bean.BaseCardBean;
import com.huawei.appmarket.service.usercenter.personal.view.card.AppGalleryPersonalAwardImgCard;
import com.huawei.appmarket.service.usercenter.personal.view.card.AppGalleryPersonalMsgImgCard;
import com.huawei.appmarket.service.usercenter.personal.view.card.PersonalCommentImgCard;
import com.huawei.appmarket.service.usercenter.personal.view.card.PersonalGiftImgCard;
import java.util.ArrayList;
import java.util.List;
import o.azb;
import o.cht;
import o.chz;
import o.cih;
import o.der.d;
import o.der.g;
import o.ekw;

public class AppGalleryPersonalCombineImgNode extends cht {
    protected List<ekw> ˊ = new ArrayList();

    public AppGalleryPersonalCombineImgNode(Context context) {
        super(context, 1);
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
        layoutParams.weight = 1.0f;
        LayoutInflater from = LayoutInflater.from(this.ॱ);
        LinearLayout linearLayout = (LinearLayout) from.inflate(g.ˎ, null);
        ˎ();
        LinearLayout linearLayout2 = (LinearLayout) linearLayout.findViewById(d.ﾞ);
        azb.ॱॱ(linearLayout2);
        for (int i = 0; i < 4; i++) {
            View view = (ViewGroup) from.inflate(g.ˋ, null);
            ekw o_ekw = (ekw) this.ˊ.get(i);
            o_ekw.ˏ(view);
            linearLayout2.addView(view, layoutParams);
            ˊ(o_ekw);
        }
        viewGroup.addView(linearLayout, layoutParams);
        return true;
    }

    protected void ˎ() {
        this.ˊ.add(new AppGalleryPersonalAwardImgCard(this.ॱ));
        this.ˊ.add(new PersonalGiftImgCard(this.ॱ));
        this.ˊ.add(new PersonalCommentImgCard(this.ॱ));
        this.ˊ.add(new AppGalleryPersonalMsgImgCard(this.ॱ));
    }

    public boolean ॱ(chz o_chz, ViewGroup viewGroup) {
        for (int i = 0; i < 4; i++) {
            cih ˊ = ˊ(i);
            if (ˊ != null) {
                ˊ.ˎ(new BaseCardBean(), viewGroup);
            }
        }
        return true;
    }
}
